package com.fourhats.services.dto;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.List;

public class ProductDto {

	private Long id;
	
	private String name;
	
	private String shortName;
	
	private String subtitle;
	
	private String shortSubtitle;
	
	private String description;
	
	private String shortDescription;
	
	private boolean enable;

	private double price;
	
	private boolean negotiablePrice;

	private int quantity;
	
	private List<ImageDto> images;
	
	private Date creationDate;
	
	//categoryInfo
	private String category;
	private Long categoryId;
	
	//MarketInfo
	private Long marketId;
	private String marketName;
	private String marketPhone;
	private String marketEmail;
	private String marketAddress;
	private String marketImagePath;
	private boolean marketEnable;
	private BigDecimal marketLatitude;
	private BigDecimal marketLongitude;
	
	//userInfo
	private String userName;
	private String userSurname;
	private String userEmail;
	private Long userId;
	
	private Long qtyVisits;
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}
	
	public String getSubtitle() {
		return subtitle;
	}
	
	public void setShortSubtitle(String shortSubtitle) {
		this.shortSubtitle = shortSubtitle;
	}
	
	public String getShortSubtitle() {
		return shortSubtitle;
	}

	public void setSubtitle(String subtitle) {
		this.subtitle = subtitle;
		this.setShortSubtitle(subtitle == null ? "" : subtitle.length() > 73 ? subtitle.substring(0, 70).concat("...") : subtitle);
	}
	
	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	public String getShortName() {
		return shortName;
	}

	public void setName(String name) {
		this.name = name;
		this.setShortName(name.length() > 25 ? name.substring(0, 22).concat("...") : name);
	}

	public String getDescription() {
		return description;
	}
	
	public void setShortDescription(String shortDescription) {
		this.shortDescription = shortDescription;
	}
	
	public String getShortDescription() {
		return shortDescription;
	}

	public void setDescription(String description) {
		this.description = description;
		this.setShortDescription(description == null ? "" : description.length() > 73 ? description.substring(0, 70).concat("...") : description);
	}

	public boolean isEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public boolean isNegotiablePrice() {
		return negotiablePrice;
	}

	public void setNegotiablePrice(boolean negotiablePrice) {
		this.negotiablePrice = negotiablePrice;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public List<ImageDto> getImages() {
		return images;
	}

	public void setImages(List<ImageDto> images) {
		this.images = images;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public Long getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public String getMarketName() {
		return marketName;
	}

	public void setMarketName(String marketName) {
		this.marketName = marketName;
	}

	public String getMarketPhone() {
		return marketPhone;
	}

	public void setMarketPhone(String marketPhone) {
		this.marketPhone = marketPhone;
	}

	public String getMarketEmail() {
		return marketEmail;
	}

	public void setMarketEmail(String marketEmail) {
		this.marketEmail = marketEmail;
	}

	public String getMarketAddress() {
		return marketAddress;
	}

	public void setMarketAddress(String marketAddress) {
		this.marketAddress = marketAddress;
	}
	
	public String getMarketImagePath() {
		return marketImagePath;
	}

	public void setMarketImagePath(String marketImagePath) {
		this.marketImagePath = marketImagePath;
	}

	public boolean isMarketEnable() {
		return marketEnable;
	}

	public void setMarketEnable(boolean marketEnable) {
		this.marketEnable = marketEnable;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserSurname() {
		return userSurname;
	}

	public void setUserSurname(String userSurname) {
		this.userSurname = userSurname;
	}

	public Long getMarketId() {
		return marketId;
	}

	public void setMarketId(Long marketId) {
		this.marketId = marketId;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getQtyVisits() {
		return qtyVisits;
	}

	public void setQtyVisits(Long qtyVisits) {
		this.qtyVisits = qtyVisits;
	}

	public String getUserEmail() {
		return userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}

	public BigDecimal getMarketLatitude() {
		return marketLatitude;
	}

	public void setMarketLatitude(BigDecimal marketLatitude) {
		this.marketLatitude = marketLatitude;
	}

	public BigDecimal getMarketLongitude() {
		return marketLongitude;
	}

	public void setMarketLongitude(BigDecimal marketLongitude) {
		this.marketLongitude = marketLongitude;
	}
}